<include file="./Application/Home/View/Header/header.html" />
<section>
    <div class="am-container">
        <table class="am-table am-table-bd">
            <thead>
            <tr>
                <th>活动时间</th>
                <th>活动名称</th>
                <th>通过</th>
               <!-- <th>修改</th>-->
                <th>驳回</th>
                <th>删除</th>
            </tr>
            </thead>
            <tbody>
            <volist name="act_list" id="act">
                <tr>
                    <th>{$act.atime}</th>
                    <th>{$act.atheme}</th>
                    <th><a type="button" class="am-btn am-btn-primary" href="__URL__/allowActivity/aid/{$act.aid}">通过</a></th>
                   <!-- <th><a type="button" class="am-btn am-btn-primary" href="__URL__/getActivity/aid/{$act.aid}">修改</a></th>-->
                    <th><a type="button" class="am-btn am-btn-primary" id="{$act.aid}" href="#">驳回</a></th>
                    <th><a type="button" class="am-btn am-btn-primary" href="__URL__/deleteActivity/aid/{$act.aid}">删除</a></th>
                    <div class="am-modal am-modal-prompt" tabindex="-1" id="reject{$act.aid}">
                        <div class="am-modal-dialog">
                            <div class="am-modal-hd">驳回意见</div>
                            <div class="am-modal-bd">
                                来来来，吐槽点啥吧
                                <form action="__URL__/rejectActivity/aid/{$act.aid}" method="post" id="form{$act.aid}">
                                    <input type="text" class="am-modal-prompt-input" name="backup" id="backup">
                                </form>
                            </div>
                            <div class="am-modal-footer">
                                <span class="am-modal-btn" data-am-modal-cancel>取消</span>
                                <span class="am-modal-btn" data-am-modal-confirm>提交</span>
                            </div>
                        </div>
                    </div>
                    <script>
                        $(function() {
                            $('#{$act.aid}').on('click', function() {
                                $('#reject{$act.aid}').modal({
                                    relatedElement: this,
                                    onConfirm: function() {
                                        if($('#backup').val()!=''){
                                            console.log($('#form{$act.aid}'));
                                            $('#form{$act.aid}').submit();
                                        }else{
                                            alert('请填写驳回意见!');
                                        }
                                    },
                                    onCancel: function() {
                                        console.log('请填写驳回意见!');
                                    }
                                });
                            });
                        });
                    </script>
                </tr>





            </volist>
            </tbody>
        </table>

    </div>
<!--    <div class="am-container">
        <div class="col-md-3">&nbsp;</div>
        <div class="am-col-md-6">
            <ul class="am-pagination">
                <li class="am-disabled"><a href="#">&laquo;</a></li>
                <li class="am-active"><a href="#">1</a></li>
                <li><a href="#">2</a></li>
                <li><a href="#">3</a></li>
                <li><a href="#">4</a></li>
                <li><a href="#">5</a></li>
                <li><a href="#">&raquo;</a></li>
            </ul>
        </div>
        <div class="col-md-3"></div>

    </div>-->


</section>

<include file="./Application/Home/View/Footer/footer.html" />